<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

class CreateBlog extends Migration
{
    public function up()
    {
        Schema::create('blog', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->string('title', 200)->nullable()->comment('标题');
            $table->string('cover', 200)->nullable()->comment('封面');
            $table->string('summary', 200)->nullable()->comment('摘要');
            $table->text('content')->nullable()->comment('内容');
        });
    }
    public function down()
    {
        // 数据库回滚是比较危险的操作，推荐使用人工代替
    }
}